package com.laijiale.dto;

import com.laijiale.constant.RE;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * @author laijiale
 * @date 2025年01月09日 14:24
 */
@Schema(name = "集次修改DTO")
@Data
public class EpisodeUpdateDTO implements Serializable, RE {
      @NotNull(message = "主键不能为空")
      @Schema(description = "主键")
      private Long id;
      @Pattern(regexp = TITLE_RE, message = TITLE_RE_MSG)
      @Schema(description = "标题")
      private String title;
      @Pattern(regexp = INFO_RE, message = INFO_RE_MSG)
      @Schema(description = "描述")
      private String info;
      @Range(min = 0, message = "序号最小为o")
      @Schema(description = "序号")
      private Long idx;
      @Schema(description = "季次表ID，季次表外键")
      private Long fkSeasonId;
}
